<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<script src="../webapp/BootStrap/js/jquery.js"></script>
	<script src="../webapp/BootStrap/js/bootstrap.js"></script>
	<link rel="stylesheet" href="../webapp/BootStrap/css/bootstrap.css">
	<link rel="stylesheet" href="../webapp/static/css/login.css">
	<script src="../webapp/static/js/ZhengZe.js"></script>
	<script src="../webapp/static/layui/layui.js"></script>
	<link rel="stylesheet" href="../webapp/static/layui/css/layui.css">
	<title>Title</title>
	<script>
		function zhifu() {
			location.href= "/pay";
		}
	</script>
</head>
<body>

<form action="/setkey">
	手机号:	<input name="phone"/> <br/>
	<button type="submit">提交</button>
</form>
<br/>
	<button onclick="zhifu()">支付</button>
		<form>
			手机号:	<input name="phone" id="p1"/> <br/>
			验证码: <input name="random" id="p2"/> <br/>
			<button type="button" onclick="tijiao()">提交</button>
		</form>
		<br/>
</body>
</html>
		<script>
			function tijiao() {
			var phone =	$("#p1").val();
				var random =	$("#p2").val();
				$.ajax({
					url: "/getkey",
					type: "get",
					datatype : "json",
					data: {"phone" : phone, "random" : random},
					success:function (data) {
						alert(data);
					}
				})
			}
		</script>
